home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #9
/
Amiga Plus CD - 2004 - No. 09.iso
/
amigaplus
/
tools
/
dev_libs
/
feelin040718
/
demos
/
test.e
< prev
next >
Wrap
Text File
|
2004-08-03
|
1KB
|
64 lines
OPT PREPROCESS
MODULE 'feelin','libraries/feelin',
'dos/dos'
CONST NUM = 1000
PROC main()
DEF list:PTR TO LONG,i,
ds1:datestamp,ds2:datestamp
IF feelinbase := OpenLibrary('feelin.library',FV_VERSION)
IF list := F_New(NUM + 1 * 4)
WriteF('This test will create \d instances of
FC_Object
.\n\n',NUM)
WriteF('
F_NewObjA()
')
Forbid() ; DateStamp(ds1)
FOR i := 0 TO NUM - 1 DO list[i] := F_NewObjA(FC_Object,NIL)
DateStamp(ds2) ; Permit() ; saytime(ds1,ds2)
WriteF('
F_DisposeObj()
')
Forbid() ; DateStamp(ds1)
FOR i := 0 TO NUM - 1 DO F_DisposeObj(list[i])
DateStamp(ds2) ; Permit() ; saytime(ds1,ds2)
WriteF('This test will create \d instances of
FC_Object
.\n\n',NUM)
WriteF('
F_NewObjA()
')
Forbid() ; DateStamp(ds1)
FOR i := 0 TO NUM - 1 DO list[i] := F_NewObjA(FC_Object,NIL)
DateStamp(ds2) ; Permit() ; saytime(ds1,ds2)
WriteF('
F_DisposeObj()
')
Forbid() ; DateStamp(ds1)
FOR i := 0 TO NUM - 1 DO F_DisposeObj(list[i])
DateStamp(ds2) ; Permit() ; saytime(ds1,ds2)
F_Dispose(list)
ENDIF
CloseLibrary(feelinbase)
ENDIF
ENDPROC
PROC saytime(ds1:PTR TO datestamp,ds2:PTR TO datestamp)
DEF ticks
ticks := ((((ds2.minute - ds1.minute) * 60)) * TICKS_PER_SECOND) + (ds2.tick - ds1.tick)
WriteF('%12.ld per second (%4.ld ticks)\n',NUM * TICKS_PER_SECOND / ticks,ticks)
ENDPROC